package com.day17.ex03;

import java.io.FileOutputStream;
import java.io.IOException;

public class FileOutputStreamDemo04 {
    public static void main(String[] args) {
        FileOutputStream fos=null;
        try{
            fos=new FileOutputStream("D:\\java\\javaSE\\javaSE\\src\\com\\day17\\ex03\\test.txt");
            fos.write("hello".getBytes());
        }catch (IOException e){
            e.printStackTrace();
        }finally {
            {
                if(fos!=null){
                    try{
                        fos.close();
                    }catch (IOException e){
                        e.printStackTrace();
                    }
                }
            }
        }
    }
}
